#include "EWAUIWidgetHorizontalSegBar.hpp"

namespace Eyer
{
    int EWAUIWidgetHorizontalSegBar::OnDraw()
    {
        RemoveAllUIGraph();
        EyerSmartPtr<EWAUIGraphRect> rect(new EWAUIGraphRect());
        rect->xy.SetX(0);
        rect->xy.SetY(0);
        rect->wh = wh;
        rect->background = bgColor;
        AddUIGraph(rect);
        return 0;
    }

    EWAUIWidgetHorizontalSegBar::EWAUIWidgetHorizontalSegBar(EWAUILayoutParams _width, EWAUILayoutParams _height)
        : EWAUIWidget(_width, _height)
    {
        SetWidgetName("EWAUIWidgetHorizontalSegBar");
        SetMinWH(3, 10);
    }
}